UNPKG

marko

Version:

UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.

20 lines (17 loc) 704 B
"use strict";exports.__esModule = true;exports.default = _default;var _compiler = require("@marko/compiler"); var _he = require("he"); var _vdomOutWrite = _interopRequireDefault(require("../util/vdom-out-write")); var _withPreviousLocation = _interopRequireDefault(require("../util/with-previous-location"));function _interopRequireDefault(e) {return e && e.__esModule ? e : { default: e };} function _default(path) { const { node } = path; path.replaceWith( (0, _withPreviousLocation.default)( (0, _vdomOutWrite.default)( "t", _compiler.types.stringLiteral((0, _he.decode)(node.value)), path.hub.file._componentInstanceIdentifier ), node ) ); }